<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		* {
			margin: 0;
		}
		header {
			height: 46px;
			background-color: #ccc;
		}
		footer {
			height: 50px;
			background-color: #f40;
		}
		/* vh - viewport height  vh c3的单位,将整个视口分成100份 */
		main {
			height: calc(100vh - 46px - 50px);
			background-color: pink;
		}
	</style>
</head>
<body>
	<section>
		<header>头部</header>
		<main>主体</main>
		<footer>底部</footer>
	</section>
</body>
</html>